import {createRouter, createWebHistory} from 'vue-router'
import Home from '../views/Home'
import Login from '../views/Login'
import Todo from "../views/Todo";
import TikTok from "../views/TikTok";

const routes = [
    {
        path: '/',
        name: 'Login',
        component: Login
    },
    {
        path: '/home',
        name: 'Home',
        component: Home,
        children: [
            {
                path: '/todo',
                name: 'Todo',
                component: Todo
            },
            {
                path: '/tikTok',
                name: 'TikTok',
                component: TikTok
            }
        ]
    }
]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
})

export default router
